<template>
  <a-card>
    <pro-table
      ref="tableRef"
      :fetch="fetch"
      :columns="columns"
      :operate="operate"
      :pagination="pagination"
    >
    </pro-table>
  </a-card>
</template>

<script setup>
import { tree } from "@/api/module/dept";
import {reactive} from "vue";
const pagination = false;
const state = reactive({
  selectedRowKeys: [],
})

const fetch = async (param) => {
  let response = await tree(param);
  return {
    data: response.data,
  };
};

const search = function(value) {
  console.log(value, 'value')
}

const columns = [
  { dataIndex: "name", key: "name", title: "发起人" },
  { dataIndex: "address", key: "address", title: "审批人" },
  { dataIndex: "address", key: "address", title: "审批流名称" },
  { dataIndex: "address", key: "address", title: "发起时间" },
  { dataIndex: "address", key: "address", title: "审批状态" },
]

const operate = [
  // { label: "详情", event: function (record) { state.visibleInfo = true; state.recordInfo = record }},
  // { label: "删除", event: function (record) { removeMethod(record) }},
  { label: '详情' },
  { label: '复制' },
  { label: '删除' },
];
</script>

<style scoped>

</style>
